#include "precompile.h"

#include "MacroCommand.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

MacroCommand::MacroCommand()
{
}

MacroCommand::~MacroCommand()
{
}

void MacroCommand::Execute()
{
	for (uint32 i = 0; i < m_commands.size(); ++i)
	{
		ICommand* command = m_commands[i];
		command->Execute();
	}
}

void MacroCommand::AddCommand(ICommand* command)
{
	m_commands.push_back(command);
}

uint32 MacroCommand::GetCommandCount() const
{
	return m_commands.size();
}

ICommand* MacroCommand::GetCommand(uint32 index) const
{
	ASSERT(index < m_commands.size());
	return m_commands[index];
}